<template>
    <div>
      <img src="../assets/logo.png" />
      <NewsList :data="newsList"></NewsList>
    </div>
  </template>
  
  <script setup>
  import { ref } from "vue";
  import NewsList from "@/components/NewsList.vue";
  import axios from 'axios';
  
  const newsList = ref([]);
  
  axios
    .get("/juheNews?type=top&key=31600d3d29ce09b3836c69014e035577")
    .then((response) => {
      newsList.value = response.data.result.data;
    })
    .catch((error) => {
      console.log(error);
    });
  </script>
  
  <style scoped>
  img {
    width: 100%;
    height: 100px;
    display: block;
  }
  </style>